//
// Created by hps on 24-3-31.
//

#include "NavigationWindows.h"

namespace hps {
NavigationWindows::NavigationWindows() {
    m_layout = new QHBoxLayout(this);
    m_noteBookNavigation = new hps::NoteBookNavigationWindow();
    m_noteBookDirNavigation = new hps::NoteBookDirNavigationWindow();
    m_searchNavigation = new hps::SearchNavigationWindow();

    init();
    setUi();
}
void NavigationWindows::init() {
    m_layout -> setContentsMargins(0,0,0,0);
    m_layout -> setAlignment(Qt::AlignLeft);
    m_layout -> setSpacing(0);
}
void NavigationWindows::setUi() {
    m_layout -> addWidget(m_noteBookNavigation);
    m_navigationWinList.push_back(m_noteBookNavigation);
    hideNoteBookNav();

    m_layout -> addWidget(m_noteBookDirNavigation);
    m_navigationWinList.push_back(m_noteBookDirNavigation);
    hideNoteBookDirNav();

    m_layout -> addWidget(m_searchNavigation);
    m_navigationWinList.push_back(m_searchNavigation);
    hideSearchNav();
}
void NavigationWindows::hideAllNav() {
    for (auto navWin : m_navigationWinList)
        if (!navWin -> isHidden()) {
            navWin -> hide();
        }
}
} // hps